<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>let</title>
</head>
<body>
<script>
    {
        var x = 1;
        let y = 2;
    }
    console.log(x);
    console.log(y); // 会报错  let 是不能跨域的
    const a = 1;   // 声明一个常量 ，声明后该常量是“只读”状态
    console.log(a)
</script>
</body>
</html>